shape rank